<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../../css/backstage.css" type="text/css"/>
    <title>JpetStore后台管理</title>
    <script th:src = "@{/JS/jquery-3.2.1.js}"></script>
    <script th:src = "@{/JS/jquery-ui.js}"></script>
</head>
<body>
<div th:replace="/administrator/common/head.html"></div>
<div class="mid">
    <div class="title">
        <label >添加宠物</label><br>
    </div>
    <form action="/catalog/saveItem" class="addItem" id="ItemSubmit">
        <div>
            <label>请选择宠物种类：
                <select id="categotyId" name="categoryId">
                    <option value="BIRDS">Birds</option>
                    <option value="CATS">Cats</option>
                    <option value="DOGS">Dogs</option>
                    <option value="FISH">Fish</option>
                    <option value="REPTILES">Reptiles</option>
                </select>
                <script>
                    var categotyId = document.getElementById("categotyId");
                    categotyId.value = "";
                </script>
            </label>
        </div>
        <div>
            请选择产品类型：
            <select id="productId" name="productId" style="width: 100px">

            </select>
        </div>
        <div>
            随机生成的ItemId：
            <input type="text" id="ItemId" name="ItemId" style="width: 100px" readonly="readonly">
        </div>

        <div>
            请输入出售价格：&nbsp&nbsp&nbsp&nbsp<input type="text" name="listPrice" required="required">
        </div>
        <div>
            请输入成本(成本不会展示给用户)：&nbsp&nbsp&nbsp&nbsp<input type="text" name="unitCost" required="required">
        </div>
        <div>
            请输入库存容量：&nbsp&nbsp&nbsp&nbsp<input type="text" name="supplierId" id="supplierId" required="required">
            <p id="supperError"></p>
        </div>
        <div>
            设置状态：&nbsp&nbsp&nbsp&nbsp
            <input name="status" type="radio" value="P" checked="checked"/>出售
            <input name="status" type="radio" value="NP" />暂不出售
        </div>
        <div>
            请输入详细描述：<input type="text" name="attribute1" style="width: 200px" required="required">
        </div>
        <div>
            <input type="submit" value="确定">
        </div>
        <script th:src="@{/JS/administrator/catalog/AddItem.js}"></script>
    </form>

</div>
<div th:replace="/administrator/common/foot.html"></div>
</body>
</html>